
package com.uuah.server.api.config.registry;

import java.util.Collection;

import com.uuah.server.api.component.model.IModel;
import com.uuah.server.api.component.service.IService;
import com.uuah.server.api.endpoint.IEndpointBuilder;
import com.uuah.server.api.endpoint.IEndpointFactory;
import com.uuah.server.api.endpoint.IUuahEndpoint;
import com.uuah.server.api.transformer.IBaseTransformer;
import com.uuah.server.api.transport.IConnector;
import com.uuah.server.exception.AbstractUuahServerException;
import com.uuah.server.exception.registry.ServiceException;
import com.uuah.server.exception.transformer.TransformerException;

/**
 *  * * Adds lookup/register/unregister methods for Uuah AppServer-specific entities to the
 * standard Registry interface.
 *
 * <p>update record:updator，update time，update content and version</p>
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-26 下午11:58:09
 * @version 1.0.0
 */
public interface IUuahRegistry extends IRegistry {
	/**
	 *
	 * @param name
	 * @return
	 */
	IConnector lookupConnector(String name);

	IEndpointBuilder lookupEndpointBuilder(String name);

	IEndpointFactory lookupEndpointFactory();

	IBaseTransformer lookupTransformer(String name);

	IService lookupService(String name);

	IBaseTransformer lookupTransformerFromOriCache(Class input, Class output);

	IBaseTransformer lookupTransformer(Class input, Class output)
			throws TransformerException;

	Collection<IService> lookupServices(String model);

	Collection<IService> lookupServices();

	IModel lookupModel(String name);

	IModel lookupSystemModel();

	void registerConnector(IConnector connector) throws AbstractUuahServerException;

	void unregisterConnector(String connectorName) throws AbstractUuahServerException;

	void registerEndpoint(IUuahEndpoint endpoint) throws AbstractUuahServerException;

	void unregisterEndpoint(String endpointName) throws AbstractUuahServerException;

	public void registerEndpointBuilder(String name, IEndpointBuilder builder)
			throws AbstractUuahServerException;

	void registerTransformer(IBaseTransformer transformer) throws AbstractUuahServerException;

	void unregisterTransformer(String transformerName) throws AbstractUuahServerException;

	void registerService(IService service) throws AbstractUuahServerException;

	void unregisterService(String serviceName) throws AbstractUuahServerException;

	void registerModel(IModel model) throws AbstractUuahServerException;

	void unregisterModel(String modelName) throws AbstractUuahServerException;

	IServiceDescriptor lookupServiceDescriptor(String type, String name) throws ServiceException;
}
